package com.osgix.authorize.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.osgix.authorize.model.RolePrivilege;
import com.osgix.authorize.dao.RolePrivilegeDao;
import com.osgix.authorize.service.RolePrivilegeManager;
import com.osgix.common.orm.Page;
import com.osgix.common.orm.ibatis.EntityDao;
import com.osgix.common.service.BaseManager;
import com.osgix.common.service.AbsBaseManager;
import com.osgix.authorize.service.RolePrivilegeManager;

import com.osgix.common.orm.ibatis.BaseIbatisDao;
import org.springframework.stereotype.Repository;

@Service("rolePrivilegeManager")
@Transactional
public class RolePrivilegeManagerImpl extends AbsBaseManager<RolePrivilege,Long> implements RolePrivilegeManager{

	private RolePrivilegeDao rolePrivilegeDao;
	
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	@Resource
	public void setRolePrivilegeDao(RolePrivilegeDao dao) {
		this.rolePrivilegeDao = dao;
	}
	
	public EntityDao getEntityDao() {
		return this.rolePrivilegeDao;
	}
	
	public void saveRolePrivilege(RolePrivilege rolePrivilege) {
		rolePrivilegeDao.save(rolePrivilege);
	}
	
	public void updateRolePrivilege(RolePrivilege rolePrivilege) {
		rolePrivilegeDao.update(rolePrivilege);
	}
	
	
}
